home *** CD-ROM | disk | FTP | other *** search
/ ADA Programming Guide / ADA Programming Guide.iso / ada_lrm / lr8vt.src < prev    next >
Text File  |  1996-01-30  |  2KB  |  84 lines

  1.  
  2. --              Ada LRM Reader
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9. with TEXT_IO; use TEXT_IO; 
  10. with MACHINE_SPECIFIC; use MACHINE_SPECIFIC; 
  11. with LRM_TYPES; use LRM_TYPES; 
  12. with LRM_GLOBAL; use LRM_GLOBAL; 
  13.  
  14. -- If using DEC VAX VMS and a VT100 or better terminal,
  15. --   instantiate LRM_SMG
  16. -- If using any other configuration,
  17. --   instantiate LRM_NON_SMG
  18.  
  19. with LRM_SMG; use LRM_SMG; 
  20.  
  21.  
  22. procedure LRMWITHSMG is 
  23.  
  24.  
  25.  
  26. -----------------------------------------------------------------------
  27. --      main task code                                               --
  28. -----------------------------------------------------------------------
  29.  
  30. begin
  31.  
  32.   READ_IN_FILE_NAMES(FILE_NAMES_DATA_FILE_NAME); 
  33.  
  34.   ---read_in_file_names("LRMinit");
  35.   CLS; 
  36.   NEW_LINE(3); 
  37.   PUT_LINE("Welcome to the Ada Language Reference Manual."); 
  38.   PUT_LINE("Please be patient during initialization."); 
  39.  
  40.   GENERATE_CHAP_POINTERS(CHAP_POINTERS); 
  41.  
  42.   INITIALIZE; 
  43.  
  44.   if USING_DEC_TERMINAL then 
  45.  
  46.     WELCOME(WELCOME_MSG_FILE_NAME); 
  47.  
  48.     DISPLAY_EXPLAIN(EXPLANATION_FILE_NAME); 
  49.  
  50.     DISPLAY_MAIN_MENU(MENU_MAIN_FILE_NAME); 
  51.  
  52.     loop
  53.  
  54.       SELECT_FROM_MAIN_MENU(MAIN_MENU_CHOICE); 
  55.  
  56.       case MAIN_MENU_CHOICE(1) is 
  57.         when '1' => 
  58.           SCROLL_TEXT(LRM_FILE_NAME_PREFIX(1 .. LRM_FILE_NAME_PREFIX_LENGTH) & 
  59.             "foreward.doc", "Foreword         ", SAVE_FILE); 
  60.         when '2' => 
  61.           SCROLL_TEXT(LRM_FILE_NAME_PREFIX(1 .. LRM_FILE_NAME_PREFIX_LENGTH) & 
  62.             "toc.doc", "Table of Contents", SAVE_FILE); 
  63.         when '3' => 
  64.           DO_CHAPTER_MENU(SAVE_FILE); 
  65.         when '4' => 
  66.           DO_ANNEX_MENU(SAVE_FILE); 
  67.         when '5' => 
  68.           SCROLL_TEXT(LRM_FILE_NAME_PREFIX(1 .. LRM_FILE_NAME_PREFIX_LENGTH) & 
  69.             "postscrpt.doc", "Postscripts      ", SAVE_FILE); 
  70.         when '6' => 
  71.           CREDITS(SAVE_FILE); 
  72.         when '7' | 'e' | 'E' | 'q' | 'Q' => 
  73.           exit; 
  74.         when others => 
  75.           null; 
  76.       end case; 
  77.     end loop; 
  78.  
  79.   end if; 
  80.  
  81.   TERMINATE_LRM; 
  82.  
  83. end LRMWITHSMG; 
  84.